
import 'package:flutter/material.dart';

///
/// list_view_demo.dart
///

// No MediaQuery ancestor could be found
// starting from the context that was passed to MediaQuery.of().
// This can happen because you have not added a WidgetsApp, CupertinoApp,
// or MaterialApp widget (those widgets introduce a MediaQuery),
// or it can happen if the context you use comes from a widget above those widgets.
void main() => runApp(const MaterialApp(home: ListViewDemoWidget(),));

class ListViewDemoWidget extends StatelessWidget {
  const ListViewDemoWidget({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('ListView Demo')),
      body: ListView(
        children: const <Widget>[
          ListTile(leading: Icon(Icons.map),title: Text('Map'),),
          ListTile(leading: Icon(Icons.mail),title: Text('Mail'),),
          ListTile(leading: Icon(Icons.message),title: Text('Message'),),
        ],
      ),
    );
  }
}


